using System;
using System.Collections.Generic;

using TnPlus.Entities.Utils;
using TnPlus.Entities.Models;
using TnPlus.DAL;
using TnPlus.Common;

namespace TnPlus.Biz
{
	public class FactorCustomersTodayService
	{
		/// <summary>
		/// Saves a record to the FactorCustomersToday table.
		/// </summary>
		public virtual void Insert(FactorCustomersTodayInfo factorCustomersTodayInfo)
		{
			try
			{
				new FactorCustomersTodayDAO().Insert(factorCustomersTodayInfo);
			}
			catch (Exception ex)
			{
				Logger.Error("TnPlus.Biz.FactorCustomersToday - Insert", ex);
				throw;
			}

		}

		/// <summary>
		/// Saves a record to the FactorCustomersToday table.
		/// </summary>
		public virtual void Update(FactorCustomersTodayInfo factorCustomersTodayInfo)
		{
			try
			{
				new FactorCustomersTodayDAO().Update(factorCustomersTodayInfo);
			}
			catch (Exception ex)
			{
				Logger.Error("TnPlus.Biz.FactorCustomersToday - Update", ex);
				throw;
			}

		}

		/// <summary>
		/// Delete a record from the FactorCustomersToday table.
		/// </summary>
		public virtual void Delete(Guid? idFactorCustomer)
		{
			try
			{
				new FactorCustomersTodayDAO().Delete(idFactorCustomer);
			}
			catch (Exception ex)
			{
				Logger.Error("TnPlus.Biz.FactorCustomersToday - Delete", ex);
				throw;
			}

		}

		/// <summary>
		/// Selects a single record from the FactorCustomersToday table.
		/// </summary>
		public virtual FactorCustomersTodayInfo Select(Guid? idFactorCustomer)
		{
			try
			{
				return new FactorCustomersTodayDAO().Select(idFactorCustomer);
			}
			catch (Exception ex)
			{
				Logger.Error("TnPlus.Biz.FactorCustomersToday - Select", ex);
				throw;
			}

		}

		/// <summary>
		/// Selects all records from the FactorCustomersToday table.
		/// </summary>
		public List<FactorCustomersTodayInfo> SelectAll()
		{
			try
			{
				return new FactorCustomersTodayDAO().SelectAll();
			}
			catch (Exception ex)
			{
				Logger.Error("TnPlus.Biz.FactorCustomersToday - SelectAll", ex);
				throw;
			}

		}

	}
}
